import { reqSearchList } from '@/api/search'
const state = {
  searchList: {} // 用户数据
}

const getters = {}
const mutations = {
  saveSearchList(state, searchList) {
    state.searchList = searchList
  }
}
const actions = {
  async getSearchList(context, params) {
    const res = await reqSearchList(params)
    // console.log(res)

    if (res.code === 200) {
      context.commit('saveSearchList', res.data)
    }
  }
}

export default {
  namespaced: true,
  state,
  getters,
  mutations,
  actions
}
